//
//  NSString+ErrorString.m
//  ZYHome
//
//  Created by Teplot_03 on 16/6/20.
//  Copyright © 2016年 Teplot_01. All rights reserved.
//

#import "NSString+ErrorString.h"

@implementation NSString (ErrorString)

+ (NSString *)errorStringWithCode:(NSString *)errorCode {
    
    NSString *errorString = nil;
    
    switch (errorCode.integerValue) {
        case 3001:
            errorString = @"参数为空";
            break;
            
        case 3002:
            errorString = @"数据异常";
            break;
            
        case 3003:
            errorString = @"无返回结果";
            break;
            
        case 4001:
            errorString = @"账号不存在或密码错误";
            break;
            
        case 4002:
            errorString = @"密码错误";
            break;
            
        case 4003:
            errorString = @"旧密码错误";
            break;
            
        case 4004:
            errorString = @"两次密码不一致";
            break;
            
        case 4005:
            errorString = @"账号已存在";
            break;
            
        case 4006:
            errorString = @"请重新登录";
            break;
            
        case 4007:
            errorString = @"注册类型不匹配此方法";
            break;
            
        case 4008:
            errorString = @"用户已加入俱乐部";
            break;
            
        case 4009:
            errorString = @"活动用户已报名";
            break;
            
        case 4010:
            errorString = @"活动报名会员数据不存在，请先对会员进行报名";
            break;
            
        case 4012:
            errorString = @"活动有会员限制，请先加入俱乐部";
            break;
            
        case 4013:
            errorString = @"非俱乐部会员或未通过审核，为非法操作";
            break;
            
        case 4014:
            errorString = @"身份证号错误";
            break;
            
//        case 467:
//            errorString = @"请求校验验证码频繁";
//            break;
//            
//        case 468:
//            errorString = @"验证码错误";
//            break;
//            
//        case 457:
//            errorString = @"手机号码格式错误";
//            break;
//            
//        case 456:
//            errorString = @"手机号码为空";
//            break;
//            
//        case 466:
//            errorString = @"请求校验的验证码为空";
//            break;
            
        default:
            break;
    }
    
    return errorString;
    
}

@end
